/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: ConcreteFlyweight.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/8 下午7:03
 * LastModified: 2020/03/08 19:03:08
 */

package com.qolome.knowledge.design.pattern.flyweight.general;

import lombok.extern.slf4j.Slf4j;

/**
 * @author Qolome
 * @version V1.0
 * @Description 具体享元对象
 * @date 2020年 03月08日 19:03:48
 */
@Slf4j
public class ConcreteFlyweight implements IFlyweight {

    private String intrinsicState;

    public ConcreteFlyweight(String intrinsicState) {
        this.intrinsicState = intrinsicState;
    }

    @Override
    public void operation(String extrinsicState) {
        log.info("Object address:{}", System.identityHashCode(this));
        log.info("intrinsicState:{}", this.intrinsicState);
        log.info("extrinsicState:{}", extrinsicState);
    }
}
